
<style type="text/css">
/* 分页 */
.page_data_bar{clear: both; float: right; padding: 10px 0;}
.page_data_bar a{text-decoration: underline;}
.page_data_bar span{}
#page_data_bar-page_num{width:50px;}
.page_data_bar .input_button{cursor: pointer;}
</style>

<?php //if (isset($view_data['page_data']) && $view_data['page_data']['total_item_count'] > 1): ?>
<?php if (isset($view_data['page_data']) && $view_data['page_data']['total_item_count'] > 0): ?>
<div class="page_data_bar">


    <span>共<?php echo $view_data['page_data']['total_item_count']; ?>条，<?php echo $view_data['page_data']['total_page_count']; ?>页，</span>

    <?php if (isset($view_data['page_data']['previous_page_num'])): ?>
    <a href="<?php echo $this->get_url(array('page_num' => $view_data['page_data']['previous_page_num'])); ?>"><span>&lt; 上一页</span></a> |
    <?php else: ?>
    <span class="disabled">&lt; 上一页</span> |
    <?php endif; ?>


    <?php foreach ($view_data['page_data']['page_range'] as $page_num): ?>

    <?php if ($page_num != $view_data['page_data']['current_page_num']): ?>
    <a href="<?php echo $this->get_url(array('page_num' => $page_num)); ?>"><span><?php echo $page_num; ?></span></a> |
    <?php else: ?>
    <?php echo $page_num; ?> |
    <?php endif; ?>

    <?php endforeach; ?>


    <?php if (isset($view_data['page_data']['next_page_num'])): ?>
    <a href="<?php echo $this->get_url(array('page_num' => $view_data['page_data']['next_page_num'])); ?>"><span>下一页 &gt;</span></a>
    <?php else: ?>
    <span class="disabled">下一页 &gt;</span>
    <?php endif; ?>

    <input id="page_data_bar-page_num" type="text" value="<?php echo $view_data['page_data']['current_page_num']; ?>" />
    <input class="input_button" type="button" value="跳转"  onclick="go_to_page();">


</div>


<script type="text/javascript">
function go_to_page(){
    var page_num = $('#page_data_bar-page_num').val();

//    var url = '<?php //echo $this->get_url(array('page_num' => 1)); ?>//';
//    url = url.replace(/\&page_num\=1/, '') + '&page_num=' + page_num;

    var url_params_json = <?php echo $this->get_url_params_json(); ?>;
    url_params_json['page_num'] = page_num;
    var url = wwy_get_url(url_params_json);

    window.top.location.replace(url);

    return false;
}
</script>

<?php endif; ?>